<template>
  <div>
    <!-- 顶部通栏 -->
    <AppTopNav />

    <!-- 吸顶头部 -->
    <AppHeaderSticky />

    <!-- 头部组件 -->
    <AppHeader />
    <div class="app-body">
      <!-- 二级路由 -->
      <router-view />
    </div>
    <AppFooter />
  </div>
</template>

<script>
import AppTopNav from '@/components/AppTopNav'
import AppHeader from '@/components/AppHeader'
import AppFooter from '@/components/AppFooter'
import AppHeaderSticky from '@/components/AppHeaderSticky'
import { useStore } from 'vuex'
export default {
  name: 'Layout',
  components: { AppTopNav, AppHeader, AppFooter, AppHeaderSticky },
  setup() {
    const store = useStore()
    store.dispatch('category/getList')
  }
}
// P42
</script>

<style lang="less" scoped>
  .app-body{
    min-height: 600px;
  }
</style>
